﻿<%@ Page Culture="auto" UICulture="auto" Title="Section display" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="SectionDisplay.aspx.cs" Inherits="BM.Tools.WebControls.MForm.Example.Display.Modifiers.SectionDisplay" %>

<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls"
    TagPrefix="mf" %>
<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls.Additions"
    TagPrefix="mfadd" %>
<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls.Modifiers"
    TagPrefix="mfmod" %>
<%@ Register TagPrefix="contents" TagName="ArtGallery" Src="~/Display/UserControls/ArtGalleryContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Museum" Src="~/Display/UserControls/MuseumContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Cinema" Src="~/Display/UserControls/CinemaContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Pub" Src="~/Display/UserControls/PubContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Restaurant" Src="~/Display/UserControls/RestaurantContent.ascx" %>
<asp:Content runat="server" ContentPlaceHolderID="Demonstration">
    <p>
        Different added items have different section display modifier settings:
    </p>
    <ul>
        <li>art gallery has no modifier</li>
        <li>museum has default section modifier</li>
        <li>cinema has section modifier with <code>IsCollapsed</code> set to true</li>
        <li>pub has section modifier with <code>TitleVisible</code> set to false</li>
        <li>restaurant has section modifier with <code>HasMinimizing</code> set to false</li>
    </ul>
    <mf:RootValidator runat="server" ControlToValidate="Root1" />
    <mf:Root ID="Root1" runat="server">
        <UriMappings>
            <mf:UriMapping Prefix="xs" Namespace="http://www.w3.org/2001/XMLSchema"></mf:UriMapping>
            <mf:UriMapping Prefix="" Namespace=""></mf:UriMapping>
        </UriMappings>
        <Contents>
            <mf:Branch Name="CityActivities" runat="server">
                <Contents>
                    <mf:Branch Name="ArtGallery" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:ArtGallery ID="ArtGallery1" runat="server" />
                        </Contents>
                    </mf:Branch>
                    <mf:Branch Name="Museum" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Museum ID="Museum1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:SectionDisplayModifier />
                        </Modifiers>
                    </mf:Branch>
                    <mf:Branch Name="Cinema" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Cinema ID="Cinema1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:SectionDisplayModifier IsCollapsed="true" />
                        </Modifiers>
                    </mf:Branch>
                    <mf:Branch Name="Pub" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Pub ID="Pub1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:SectionDisplayModifier TitleVisible="false" />
                        </Modifiers>
                    </mf:Branch>
                    <mf:Branch Name="Restaurant" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Restaurant ID="Restaurant1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:SectionDisplayModifier HasMinimizing="false" />
                        </Modifiers>
                    </mf:Branch>
                </Contents>
            </mf:Branch>
        </Contents>
    </mf:Root>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Description" runat="server">
    <p>
        In this example the section display functionality is presented. The section display
        can be defined using the <code>SectionDisplayModifier</code> modifier.
    </p>
    <p>
        The SectionDisplayModifier has three properties:
    </p>
    <ul>
        <li><code>TitleVisible</code> - a property that sets the whole title visibility. "True"
            is the default value for this property. When set to false, other properties have
            no effect.</li>
        <li><code>HasMinimizing</code> - a property that sets the minimize button visibility.
            "True" is the default value for this property.</li>
        <li><code>IsCollapsed</code> - a property that sets the initial state of the section.
            "False" is the default value for this property.</li>
    </ul>        
</asp:Content>
